<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<base href="http://localhost:8080/ssm/">
<link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<script src="static/bootstrap/js/jquery.js"></script>
<script src="static/bootstrap/js/bootstrap.min.js"></script>
</head>
</head>
<body>
	<!-- bootstrap美化页面 -->
	<div class="container">
		<div class="row"> 
			<div class="col-md-12"> <h1>显示英雄</h1> </div>
		</div>
		<div class="row"> 
			<div class="col-md-4 col-md-offset-10">
				<button class="btn btn-success">查询</button>
				<button class="btn btn-default">新增</button>
			</div>
		</div>
		<div class="row">  
			<div class="col-md-12">
				<table class="table table-striped">
				<tr>
					<th>id</th>
					<th>stname</th>
					<th>sex</th>
					<th>phone</th>
					<th>操作</th>
				</tr>
				<c:forEach var="user"  items="${pageInfo.list}" >
     				<tr><td>${user.stid }</td><td>${user.stname }</td><td>${user.sex }</td><td>${user.phone }</td> <td><button class="btn btn-danger">
     					<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
     				</button> 
     				<button class="btn btn-info">
     					<span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
     				</button></td> </tr>
				</c:forEach>
				</table>
			</div>
		</div>
		<div class="row">  
			<!-- 分页的文字信息 -->
			<div class="col-md-4">
				总共${pageInfo.total}行记录
			</div>
			<div class="col-md-8">
				<ul class="pagination">
					<li><a href="showheros/1">&laquo;</a></li>
					<c:forEach items="${pageInfo.navigatepageNums }" var="k">
						<c:if test="${k==pageInfo.pageNum }">
							<li><a class="btn btn-danger" href="showheros/${k}">${k}</a></li>
						</c:if>
						<c:if test="${k!=pageInfo.pageNum }">
							<li><a class="btn btn-default" href="showheros/${k}">${k}</a></li>
						</c:if>
					</c:forEach>
					<li><a href="showheros/${pageInfo.pages}">&raquo;</a></li>
				</ul>
			</div>
		</div>
	</div>
</body>
</html>